Parallel test (#303)
authortsteven4 <tsteven4@users.noreply.github.com>
Sat, 16 Feb 2019 19:05:43 +0000 (12:05 -0700)
committerGitHub <noreply@github.com>
Sat, 16 Feb 2019 19:05:43 +0000 (12:05 -0700)
* run vtesto jobs in parallel.

with the configure flow and "make check-vtesto".
This will be utilized on travis.

* add missing gitignore for new valgrind logs.

Makefile.in
build_and_test
configure
configure.ac
testo.d/.gitignore [new file with mode: 0644]
testo.d/kml.test
vtesto

index a40268856c6861f52580c919a97f7abd84c4bebc..857244d000f7de070f70687d43a117947efbdb06 100644 (file)
@@ -129,19 +129,23 @@ OBJS = main.o globals.o $(LIBOBJS) @FILEINFO@
 
 DEPFILES = $(OBJS:.o=.d)
 
+TESTCASES := $(sort $(wildcard $(srcdir)/testo.d/*.test))
+VGLOGS := $(addprefix $(builddir)/testo.d/, $(addsuffix .vglog, $(basename $(notdir $(TESTCASES)))))
+
 .cc.o:
        $(CXX) @CPPFLAGS@ @CXXFLAGS@ -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
 .c.o:
        $(CC) @CPPFLAGS@ @CFLAGS@ -c $(GBCFLAGS) $< $(OUTPUT_SWITCH)$@
 
-
+%.vglog: FORCE
+       @$(srcdir)/vtesto -l -j $@ $(basename $(notdir $@))
 
 # Directory of local web doc.  Traditionally a sibling to the GPSBabel tree.
 WEB=@DOCDIR@
 
 # Declaring a target PHONY whose names matches a subdirectory can be
 # particularly important, e.g. gui.
-.PHONY: all clean tag more-clean check torture \
+.PHONY: all clean tag more-clean check check-vtesto torture \
 install install-debug \
 dep doc \
 release-sourcecheck release-tarball release-rpm \
@@ -175,7 +179,7 @@ fileinfo.o: win32/gpsbabel.rc
        $(RC) -o fileinfo.o win32/gpsbabel.rc
 
 clean:
-       rm -f $(OBJS) gpsbabel gpsbabel.exe
+       rm -f $(OBJS) gpsbabel gpsbabel.exe $(VGLOGS)
        if [ -f gui/Makefile ]; then $(MAKE) -C gui clean; fi
        $(srcdir)/test-all -W
 
@@ -194,6 +198,9 @@ more-clean: clean
 check: gpsbabel$(EXEEXT)
        $(srcdir)/testo
 
+check-vtesto: gpsbabel$(EXEEXT)
+       $(MAKE) $(VGLOGS)
+
 torture: gpsbabel$(EXEEXT)
        @echo "testo in progress... (basic data integrity test)"
        @$(srcdir)/testo
index 719d307e5d10579ecc896bbaf05fa291b4208d6e..b2fe52478e4a1566b56affeb8200376977e79d15 100755 (executable)
@@ -39,8 +39,7 @@ make check
 ./test_encoding_latin1
 ./test_encoding_utf8
 #make torture
-rm -f vg.log
-./vtesto -l -j vg.log
+make -k -j2 check-vtesto
 # eat the verbose output from test-all, including crash.output
 # this is a bit risky, if test-all generates an error we won't see what happened.
 echo "test-all in progress... (read/write test between all possible formats)"
index d857f9dd40bc5366a9f3fa2bc82cc5044516e6a2..e9d8693202cf374cf55be6641755648ea2b14e07 100755 (executable)
--- a/configure
+++ b/configure
@@ -6778,6 +6778,7 @@ as_dir=jeeps; as_fn_mkdir_p
 as_dir=shapelib; as_fn_mkdir_p
 as_dir=src/core; as_fn_mkdir_p
 as_dir=zlib/contrib/minizip; as_fn_mkdir_p
+as_dir=testo.d; as_fn_mkdir_p
 
 ac_config_files="$ac_config_files Makefile gbversion.h gui/setup.iss xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc"
 
index 4e0d38716a55a29fe8012dc546e17cb8c9eafa94..3daf07cee5fd6b33353d9f903c5628f614a1b8ff 100644 (file)
@@ -442,6 +442,7 @@ AS_MKDIR_P([jeeps])
 AS_MKDIR_P([shapelib])
 AS_MKDIR_P([src/core])
 AS_MKDIR_P([zlib/contrib/minizip])
+AS_MKDIR_P([testo.d])
 
 AC_CONFIG_FILES([Makefile gbversion.h gui/setup.iss xmldoc/makedoc tools/mkcapabilities win32/gpsbabel.rc])
 AC_CONFIG_FILES([gui/makelinuxdist.sh], [chmod +x gui/makelinuxdist.sh])
diff --git a/testo.d/.gitignore b/testo.d/.gitignore
new file mode 100644 (file)
index 0000000..72d4efa
--- /dev/null
@@ -0,0 +1 @@
+/*.vglog
index 55b3c743437f54f50db1c37672414090cd49a741..5a1d2fcfc91acc563d0c18ac09fa42a48fbb67c1 100644 (file)
@@ -65,23 +65,25 @@ compare ${REFERENCE}/track/tracks~gpx.kml ${TMPDIR}/tracks~gpx.kml
 gpsbabel -i kml -f ${REFERENCE}/track/Placemark-Track-1.kml -o gpx -F ${TMPDIR}/Placemark-Track-1~kml.gpx
 compare ${REFERENCE}/track/Placemark-Track-1~kml.gpx ${TMPDIR}/Placemark-Track-1~kml.gpx
 
-set -e
-if which xmllint > /dev/null;
-then
-  KMLS=$(find ${REFERENCE} -name \*.kml)
-  for f in $KMLS
-  do
-    case $f in 
-      # Argue with the KML wizards about this.  It was the intent for that
-      # to be legal in Earth GX 2.2.
-      ${REFERENCE}/track/segmented_tracks-track.kml) continue;;
-    *)
-      tmpf=${TMPDIR}/$(basename $f)
-      gpsbabel -i kml -f $f -o kml -F $tmpf
-      xmllint --schema ${BASEPATH}/tools/kml22-schema/kml22gx.xsd --noout $tmpf
-    esac;
-  done
-else
-  echo "Skipping KML validation phase."
+if [ "${RUNNINGVALGRIND}" != "0" ]; then
+  set -e
+  if which xmllint > /dev/null;
+  then
+    KMLS=$(find ${REFERENCE} -name \*.kml)
+    for f in $KMLS
+    do
+      case $f in 
+        # Argue with the KML wizards about this.  It was the intent for that
+        # to be legal in Earth GX 2.2.
+        ${REFERENCE}/track/segmented_tracks-track.kml) continue;;
+      *)
+        tmpf=${TMPDIR}/$(basename $f)
+        gpsbabel -i kml -f $f -o kml -F $tmpf
+        xmllint --schema ${BASEPATH}/tools/kml22-schema/kml22gx.xsd --noout $tmpf
+      esac;
+    done
+  else
+    echo "Skipping KML validation phase."
+  fi
+  set +e
 fi
-set +e
diff --git a/vtesto b/vtesto
index b8b251c2c52cf0c13977d4f5ea363104b76ed656..6037546f8f8293f2e7b53525a5ef0e86272b1997 100755 (executable)
--- a/vtesto
+++ b/vtesto
@@ -11,7 +11,7 @@ BASEPATH=`dirname $0`
 
 while getopts "lj:" opt; do
   case $opt in
-    l) OPTS="--leak-check=full --show-reachable=yes --num-callers=24 --suppressions=gpsbabel.supp" ; QUIET="";;
+    l) OPTS="--leak-check=full --show-reachable=yes --num-callers=24 --suppressions=${BASEPATH}/gpsbabel.supp" ; QUIET="";;
     j) LOG=$OPTARG;;
   esac
 done